import numpy as np
import matplotlib.pyplot as plt

# Generate test data
np.random.seed(0)
x = np.linspace(0, 10, 100)
w, b = 2.5, -1.0
y = w * x + b + np.random.normal(scale=2.0, size=x.shape)

# Convert to comma-separated strings with 2 decimal places
x_str = ','.join(format(value, '.2f') for value in x)
y_str = ','.join(format(value, '.2f') for value in y)
print(x_str)
print(y_str)

# Plot the data
plt.scatter(x, y, color='blue', label='Data points')
plt.plot(x, w*x + b, color='red', label='True line: y = 2.5x - 1')

# Add labels and legend
plt.xlabel('x')
plt.ylabel('y')
plt.title('Generated Data Points')
plt.legend()

# Show the plot
plt.show()
